﻿using System;
using System.Linq;
using DAL;

public partial class BasicInfo_RoleInfo : Frame.Pages.ActionInfomationEditBasePage
{
    protected override string ActionID
    {
        get { return "2001"; }
    }

    protected override string UserFunctions
    {
        get
        {
            if (CMSUser.Current.IsLogin)
            {
                if (CMSUser.Current.IsAdmin)
                {
                    return "IUDQ";
                }
                else
                {
                    return CMSUser.GetFunction(ActionID).op;
                }
            }
            else
            {
                return "";
            }
        }
    }

    protected override bool IsShowSpecialFunctions
    {
        get
        {
            if (CMSUser.Current.IsLogin)
            {
                if (CMSUser.Current.IsAdmin)
                {
                    return true;
                }
                else
                {
                    return CMSUser.GetFunction(ActionID).op_s == "Y" ? true : false;
                }
            }
            else
            {
                return false;
            }
        }
    }

    protected override void Page_Load(object sender, EventArgs e)
    {
        gridView.SettingsText.PopupEditFormCaption = "编辑";
        base.Page_Load(sender, e);
    }
    //判断css_role表中是否存在当前rid
    private static bool checkRid(string id)
    {
        using (DataClassesDataContext dc = new DataClassesDataContext())
        {
            css_role role = dc.css_role.FirstOrDefault(r => r.rid == id);
            if (role != null)
            {
                return false;
            }
            else
            {
                return true;
            }
        }
    }
    protected void LSMDSourceMain_Inserting(object sender, DevExpress.Data.Linq.LinqServerModeDataSourceEditEventArgs e)
    {

    }
}